
fullname="Change Me"
email="nobody@nowhere.to"
outfile="/tmp/out.txt"

hg_interact() {
    if [ -e ${HOME}/.hgrc ]; then
        printf "An .hgrc already exists in %s\n" "${HOME}/.hgrc"
        printf "Please remove this file.\n"
        return 1
    fi

    printf "Enter your full name (e.g. Alice Smith): " 
    read fullname
    
    printf "Enter your email address (e.g. alice@mail.com): "
    read email
}

hg_write() {

    printf "\n[ui]\n" > ${outfile}
    printf "username = %s\n" "${fullname}" >> ${outfile}
    printf "editor=vi\n"
    printf "merge=meld\n"
    
    printf "\n[extensions]\n"
    
}